{extend name="base/base" /}
{block name="style"}
<style type="text/css">
.layui-table-cell{
     height: auto!important;
     white-space: normal;
}
</style>
{/block}
{block name="content"}
  <div class="layui-form-item layui-form-pane">
    <div class="layui-inline">
      <label class="layui-form-label">帐号等级</label>
      <div class="layui-input-inline">
        <select class="layui-input" name='level' id='level'>
          <option value="">全部</option>
          <option value="1">L1</option>
          <option value="2">L2</option>
		  <option value="3">L3</option>
		  <option value="4">L4</option>
		  <option value="5">L5</option>
		  <option value="6">L6</option>
        </select>
      </div>
    </div>
      <div class="layui-inline">
          <label class="layui-form-label">用户ID</label>
          <div class="layui-input-inline">
              <input type="text" name="id" autocomplete="off" class="layui-input" id='id'>
          </div>
      </div>
      <div class="layui-inline">
        <div class="demoTable">
          <button class="layui-btn" data-type="reload">搜索</button>
        </div>
      </div>
  <table id="table" lay-filter="table"></table>
</div>
{/block}
{block name="script"}
<script>
layui.use(['table', 'laydate'], function(){
  var table = layui.table;
  var laydate = layui.laydate;
  table.render({
    elem: '#table'
    ,height: 'full-200'
    ,url: '/admin/user/tdataList'//数据接口
    ,limit:20
    ,page: true //开启分页
    ,id:'table'
    ,cols: [[ //表头
      {field:'uid', title: '用户ID', width: 100}
	  ,{field:'level', title: '用户等级', width: 100}
	  ,{field:'date', title: '等级更新日期', width: 150}
	  ,{field:'zt91', title: '昨日等级奖', width: 150}
	  ,{field:'zt92', title: '昨日直推奖', width: 150}
	  ,{field:'ct1', title: '昨日直推带出', width: 150}
	  ,{field:'ct2', title: '昨日10层带出', width: 150}
    ]]
  }); 
});
  // 搜索
  var $ = layui.$, active = {
        reload: function(){
            table.reload('table', {
                where: {
                    level: $('#level').val(),
                    id: $('#id').val(),
                    identity_status: $('#identity_status').val()
                }
            });
        }
    };
</script>
{/block}
